import QtQuick
import QtQuick.Controls


Item {
    // 容器尺寸：宽1920，高980
    id: systemParameterWindow
    width: 1910
    height: 995

    Rectangle{
        anchors.fill: parent
        radius: 5
        // border.width: 1
        // border.color: "black"
        color: "#f0f0f0"
    }

    Component.onCompleted: {
        currentPage = 10
        systempageLoader.source = "System_PressedAxis_Parameter.qml"
    }

    Loader{
        id: systempageLoader
        anchors.top: systemParameterWindow.top
        anchors.topMargin: 70
        anchors.horizontalCenter: systemParameterWindow.horizontalCenter

        onStatusChanged: {
            switch(status) {
            case Loader.Null :{
                console.debug("加载空项");
                break;
            }
            case Loader.Ready:{
                console.info("加载完成: " + source);
                break;
            }
            case Loader.Loading :{
                console.debug("加载中: "+source);
                break;
            }
            case Loader.Error :{
                console.error("加载错误: "+ source);
                break;
            }
            }
        }

    }

    Row{
        anchors.top: parent.top
        anchors.topMargin: 10
        anchors.left: parent.left
        anchors.leftMargin: 5
        spacing: 5

        A_Button{
            contentText_Data: qsTr("压力轴参数")
            isSelected: currentPage === 10 || currentPage === 4
            onButtonClicked: {
                currentPage = 10
                systempageLoader.source = "System_PressedAxis_Parameter.qml"
            }
        }
        A_Button{
            contentText_Data: qsTr("刀盘轴参数")
            isSelected: currentPage === 11
            onButtonClicked: {
                currentPage = 11
                systempageLoader.source = "System_KnifeAxis_Parameter.qml"
            }
        }
        A_Button{
            contentText_Data: qsTr("附加轴参数")
            isSelected: currentPage === 12
            onButtonClicked: {
                currentPage = 12
                systempageLoader.source = "System_ExtraAxis_Parameter.qml"
            }
        }
        A_Button{
            contentText_Data: qsTr("零点设置")
            isSelected: currentPage === 13
            onButtonClicked: {
                currentPage = 13
                systempageLoader.source = "System_SetZero_Window.qml"
            }
        }
        A_Button{
            contentText_Data: qsTr("连接参数")
            isSelected: currentPage === 14
            onButtonClicked: {
                currentPage = 14
                systempageLoader.source = "System_Connect_Parameters_Window.qml"
            }
        }

    }
}
